package me.zhengjie.modules.easycode.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.easycode.service.TypeMapperService;
import me.zhengjie.modules.easycode.service.dto.TypeMapperQueryParam;
import me.zhengjie.utils.Result;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author guoqing
 * @date 2021-06-17
 **/
@RestController
@RequiredArgsConstructor
@Api(tags = "类型映射器管理")
@RequestMapping("/bamboo/easycode")
public class TypeMapperController {

    private final TypeMapperService typeMapperService;


    @PostMapping("/getTypeMapper")
    @Log("查询类型映射器")
    @ApiOperation("查询类型映射器")
    @PreAuthorize("@el.check('TypeMapper:list')")
    public Result query(@RequestBody TypeMapperQueryParam query) {
        return typeMapperService.getTypeMapperGroupList(query);
    }

}
